package com.hcy.driver.mapper;

import com.hcy.driver.dto.request.BaseInfoRequestDTO;
import com.hcy.driver.dto.response.DriverCarInfoResponseDTO;
import com.hcy.ordermodel.dto.response.HomeInfoResponseDTO;
import com.hcy.driver.entity.CarInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hcy.rabbitbasicmodel.dto.HomeData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hcy
 * @since 2021-12-29
 */
public interface CarInfoMapper extends BaseMapper<CarInfo> {

    HomeInfoResponseDTO getCarInfoByDriverId(@Param("driverId") Integer driverId);

    boolean updateCarStatus(BaseInfoRequestDTO baseInfoRequestDTO);

    DriverCarInfoResponseDTO getDriverCarInfo(@Param("driverId") Integer driverId);

    DriverCarInfoResponseDTO carDriverInfo(@Param("carId") Integer carId);

    List<DriverCarInfoResponseDTO> carDriverInfoList(List<Integer> carIds);

    List<HomeData> getNewCars();
}
